package com.mes.service.lc;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mes.dao.lc.ProductStockMapper;
import com.mes.entity.lc.ProductStock;
import com.mes.entity.lc.Stockfy;


/**
 * 产品库存 service 层 实现接口
 * @author Administrator
 *
 */
@Service
public class ProductStockServiceImpl implements ProductStockService {

	@Autowired
	ProductStockMapper productStockMapper;

	/**
	 * 分页查询
	 * @param stockfy
	 * @return
	 */
	@Override
	public List<ProductStock> selectfycx(Stockfy stockfy) {
		return productStockMapper.selectfycx(stockfy);
	}

	/**
	 * 查询总数
	 * @param stockfy
	 * @return
	 */
	@Override
	public int selectfycxcont(Stockfy stockfy) {
		return productStockMapper.selectfycxcont(stockfy);
	}

	/**
	 * 查询所有的产品库存
	 * @return
	 */
	@Override
	public List<ProductStock> selectProductStock() {
		return productStockMapper.selectProductStock();
	}
	
	
	//根据品编查产品id
		@Override
		public Long fingBynum(String pnum) {
			// TODO Auto-generated method stub
			return productStockMapper.fingBynum(pnum);
		}

		//添加库存
		@Override
		public Long add(ProductStock stock) {
			// TODO Auto-generated method stub
			return productStockMapper.add(stock);
		}
		
	
}
